#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	int n;
	cin >> n;

	int ans = 1;
	int preX = 0, preL = 1;
	for (int i = 1; i <= n; i++) {
		int x, l;
		cin >> x >> l;
		ans = max(ans, (int)ceil((l - preL + x - preX) / 2.0) + preL);
		preX = x, preL = l;
	}
	cout << ans;
	return 0;
}
